#pragma once
#include "AnimationVec3Curve.h"
#include "AnimationQuatCurve.h"
#include <glm/vec3.hpp>
#include <glm/gtx/quaternion.hpp>
#include <string>

namespace DYGraphics
{
	class _declspec(dllexport) AnimationBoneCurve
	{
	public:
		AnimationBoneCurve(std::string pBoneName): mBoneName(pBoneName) { }

		void AddTranslateKey(float pTime, glm::vec3 pValue)
		{
			mTranslateCurve.AddKey(pTime, pValue);
		}

		void AddRotationKey(float pTime, glm::quat pValue)
		{
			mRotationCurve.AddKey(pTime, pValue);
		}

		void AddScalingKey(float pTime, glm::vec3 pValue)
		{
			mScalingCurve.AddKey(pTime, pValue);
		}

		glm::vec3 EvaluateTranslate(float mTime)
		{
			return mTranslateCurve.Evaluate(mTime);
		}

		glm::quat EvaluateRotation(float mTime)
		{
			return mRotationCurve.Evaluate(mTime);
		}

		glm::vec3 EvaluateScaling(float mTime)
		{
			return mScalingCurve.Evaluate(mTime);
		}
	private:
		std::string mBoneName;
		AnimationVec3Curve mTranslateCurve;
		AnimationQuatCurve mRotationCurve;
		AnimationVec3Curve mScalingCurve;
	};
}
